Previously, the notice modal would automatically show every day even when the notice content was empty, causing unnecessary user interruption. This commit modifies the logic to: - Check notice content before showing the modal - Only display the modal when notice content exists and is not empty - Add proper error handling to prevent modal showing on API failures - Improve user experience by avoiding empty notice interruptions Changes: - Modified useEffect in Home component to fetch notice content first - Added API call to /api/notice before setting noticeVisible state - Added try-catch block for graceful error handling - Only show modal when notice data is truthy and non-empty after trimming
React Template
Basic Usages
# Runs the app in the development mode
npm start
# Builds the app for production to the `build` folder
npm run build
If you want to change the default server, please set REACT_APP_SERVER environment variables before build,
for example: REACT_APP_SERVER=http://your.domain.com.
Before you start editing, make sure your Actions on Save options have Optimize imports & Run Prettier enabled.