diff --git a/client/component/Sidebar.tsx b/client/component/Sidebar.tsx index 162017a..bc2c3da 100644 --- a/client/component/Sidebar.tsx +++ b/client/component/Sidebar.tsx @@ -68,8 +68,12 @@ const Sidebar = ({ }, [sidebarOpen]); function handleSignOut(event: MouseEvent): void { - signOut(); - router.push("/"); + event.preventDefault(); + + signOut({ + redirect: true, + callbackUrl: "/home", + }); } return ( diff --git a/client/lib/middleware.ts b/client/lib/middleware.ts index 500efcd..131092f 100644 --- a/client/lib/middleware.ts +++ b/client/lib/middleware.ts @@ -7,5 +7,5 @@ export default withAuth({ }); export const config = { - matcher : ['/topics', '/dashboard'] -} + matcher: ["/topics", "/dashboard"], +}; diff --git a/server/start-server.sh b/server/start-server.sh new file mode 100644 index 0000000..935d700 --- /dev/null +++ b/server/start-server.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Check if port 8080 is in use +PID=$(lsof -ti:8080) + +if [ -n "$PID" ]; then + echo "Port 8080 is in use by process $PID. Killing it..." + sudo kill -9 $PID + echo "Process $PID killed." +else + echo "Port 8080 is free." +fi + +# Now start the Spring Boot application +echo "Starting Spring Boot application..." +mvn spring-boot::run # or 'java -jar target/your-app.jar'