**Initialize React Vite project with basic setup**
Add initial project structure including React, Vite, TailwindCSS, and Syncfusion dependencies. Configure tooling with ESLint, TypeScript, and Tailwind plugins. Set up `.gitignore`, Syncfusion themes, and example components for demonstration purposes.
This commit is contained in:
8
react-client/.idea/.gitignore
generated
vendored
Normal file
8
react-client/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
4
react-client/.idea/encodings.xml
generated
Normal file
4
react-client/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
6
react-client/.idea/git_toolbox_blame.xml
generated
Normal file
6
react-client/.idea/git_toolbox_blame.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxBlameSettings">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
</project>
|
||||
6
react-client/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
react-client/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
8
react-client/.idea/modules.xml
generated
Normal file
8
react-client/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/react-client.iml" filepath="$PROJECT_DIR$/.idea/react-client.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
react-client/.idea/react-client.iml
generated
Normal file
12
react-client/.idea/react-client.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
15
react-client/.idea/runConfigurations/start.xml
generated
Normal file
15
react-client/.idea/runConfigurations/start.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="start" type="js.build_tools.npm" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="start" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<EXTENSION ID="com.intellij.lang.javascript.buildTools.npm.rc.StartBrowserRunConfigurationExtension">
|
||||
<browser name="37cae5b9-e8b2-4949-9172-aafa37fbc09c" start="true" with-js-debugger="true" url="http://localhost:3000/" />
|
||||
</EXTENSION>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
6
react-client/.idea/vcs.xml
generated
Normal file
6
react-client/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -8,10 +8,11 @@ function App() {
|
||||
|
||||
const [forecast, setForecast] = useState<WeatherForecast[] | undefined>([]);
|
||||
const [connection, setConnection] = useState<HubConnection | null>(null);
|
||||
const [message, setMessage] = useState<string>('');
|
||||
|
||||
useEffect(() => {
|
||||
const newConnection = new HubConnectionBuilder()
|
||||
.withUrl('http://localhost:5175/WeatherUpdateHub') // adjust the URL/port as needed
|
||||
.withUrl('http://localhost:5175/WeatherUpdateHub?userId=user1234')
|
||||
.withAutomaticReconnect()
|
||||
.build();
|
||||
|
||||
@@ -25,6 +26,7 @@ function App() {
|
||||
.then(() => {
|
||||
console.log('Connected to SignalR hub!');
|
||||
connection.on('ReceiveMessage', (user, message) => {
|
||||
setMessage(message);
|
||||
console.log('Received message:', user, message);
|
||||
});
|
||||
})
|
||||
@@ -54,7 +56,7 @@ function App() {
|
||||
<div className="App">
|
||||
{/* <header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
</div> <p>
|
||||
Edit <code>src/App.tsx</code> and save to reload.
|
||||
</p>
|
||||
<a
|
||||
@@ -76,6 +78,10 @@ function App() {
|
||||
setForecast(forecast);
|
||||
}} > Call API</button>
|
||||
|
||||
<div className="text-red-50">
|
||||
{message}
|
||||
</div>
|
||||
|
||||
|
||||
{forecast?.map((item: WeatherForecast) => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user