diff --git a/src/App.tsx b/src/App.tsx index 2539834..870ba7d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,7 +4,6 @@ import Layout from "./Layout/Ui/Layout"; import { CrudRoute, menuItems } from "./Routes"; import { Spin } from "antd"; import { hasAbility } from "./utils/hasAbility"; -import { useChangeLanguage } from "./Hooks/useChangeLanguage"; import useAuthState from "./zustand/AuthState"; import { TMenuItem } from "./types/App"; import { useTranslation } from "react-i18next"; @@ -14,7 +13,6 @@ const Page404 = lazy(() => import("./Layout/Ui/NotFoundPage")); const Auth = lazy(() => import("./Pages/Auth/Page")); const App = () => { - const { changeLanguage } = useChangeLanguage(); const navigate = useNavigate(); const { isAuthenticated } = useAuthState(); const [t] = useTranslation(); diff --git a/src/Hooks/usegetTitleFromRoute.tsx b/src/Hooks/useGetTitleFromRoute .tsx similarity index 100% rename from src/Hooks/usegetTitleFromRoute.tsx rename to src/Hooks/useGetTitleFromRoute .tsx diff --git a/src/Layout/Ui/Layout.tsx b/src/Layout/Ui/Layout.tsx index 6ac34d7..5407009 100644 --- a/src/Layout/Ui/Layout.tsx +++ b/src/Layout/Ui/Layout.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { useGetTitleFromRoute } from "../../Hooks/useGetTitleFromRoute"; +import { useGetTitleFromRoute } from "../../Hooks/useGetTitleFromRoute "; import { Helmet } from "react-helmet"; import { useLocation } from "react-router-dom"; import NavBar from "./NavBar"; diff --git a/src/ProviderContainer.tsx b/src/ProviderContainer.tsx index 19f4362..d685e49 100644 --- a/src/ProviderContainer.tsx +++ b/src/ProviderContainer.tsx @@ -1,36 +1,25 @@ import QueryProvider from "./lib/ReactQueryProvider"; import { BrowserRouter } from "react-router-dom"; -import { Tchildren } from "./types/App"; +import { ChildrenType } from "./types/App"; import ToastProvider from "./lib/ToastProvider"; -import { ConfigProvider } from "antd"; - -function ProviderContainer({ children }: Tchildren) { - const primaryColor = "#3182ce"; - const bgColor = "rgb(255, 255, 255)"; +import AntdProvider from "./lib/AntdProvider"; +import I18nProvider from "./lib/I18nProvider"; +function ProviderContainer({ children }: ChildrenType) { return ( - {/* */} - + + - + + {children} - + + - {/* */} + + ); } diff --git a/src/Routes.tsx b/src/Routes.tsx index 28b9fdd..b2183ef 100644 --- a/src/Routes.tsx +++ b/src/Routes.tsx @@ -2,8 +2,6 @@ import { TCrudRoute, TMenuItem } from "./types/App"; import { FaHome, FaMoneyBill, FaUser } from "react-icons/fa"; import { ImBooks } from "react-icons/im"; import React, { lazy } from "react"; - -// import Home from "./Pages/Home/Page"; const Dummy = React.lazy(() => import("./Pages/Home/Dummy")); const Subject = React.lazy(() => import("./Pages/subject/Table/Page")); @@ -16,10 +14,6 @@ const Question = React.lazy(() => import("./Pages/question/Page")); const AddQuestionPage = React.lazy(() => import("./Pages/question/AddPage")); const EditQuestionPage = React.lazy(() => import("./Pages/question/EditPage")); -// const QuestionChildren = React.lazy(() => import('./Pages/question/children/Page')) -// const AddQuestionChildren = React.lazy(() => import('./Pages/question/children/Model/AddModel')) -// const EditQuestionChildren = React.lazy(() => import('./Pages/question/children/Model/EditModel')) - import { hasAbility } from "./utils/hasAbility"; import { ABILITIES_ENUM, ABILITIES_VALUES_ENUM } from "./enums/abilities"; import { ParamsEnum } from "./enums/params"; diff --git a/src/enums/LocalStorageEnum.ts b/src/enums/LocalStorageEnum.ts new file mode 100644 index 0000000..207314d --- /dev/null +++ b/src/enums/LocalStorageEnum.ts @@ -0,0 +1,7 @@ +export enum LocalStorageEnum { + PROJECT_NAME = 'SCHOOL_DASHBOARD_EXERCISE', + LANGUAGE_KEY = LocalStorageEnum.PROJECT_NAME + '_LANGUAGE', + TOKEN_KEY = LocalStorageEnum.PROJECT_NAME + '_TOKEN_KEY', + USER_KEY = LocalStorageEnum.PROJECT_NAME + '_USER_KEY', + } + \ No newline at end of file diff --git a/src/index.tsx b/src/index.tsx index bf0ad5b..667ef5a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,10 +1,8 @@ import App from "./App"; import "bootstrap/dist/css/bootstrap.min.css"; import "./Styles/App/index.scss"; - import { createRoot } from "react-dom/client"; import ProviderContainer from "./ProviderContainer"; -import i18n from "i18next"; const root = createRoot(document.getElementById("root") as HTMLElement); root.render( diff --git a/src/lib/AntdProvider.tsx b/src/lib/AntdProvider.tsx new file mode 100644 index 0000000..40e8aff --- /dev/null +++ b/src/lib/AntdProvider.tsx @@ -0,0 +1,26 @@ +import { ConfigProvider } from 'antd'; + +function AntdProvider({ children }: { children: React.ReactNode }) { + const primaryColor = "#3182ce"; + const bgColor = "rgb(255, 255, 255)"; + + return ( + + {children} + + ); +} + +export default AntdProvider; diff --git a/src/lib/I18nProvider.tsx b/src/lib/I18nProvider.tsx new file mode 100644 index 0000000..3c8affa --- /dev/null +++ b/src/lib/I18nProvider.tsx @@ -0,0 +1,13 @@ +import React, { ReactNode } from 'react'; +import { I18nextProvider } from 'react-i18next'; +import i18n from './i18nConfig'; // Import the configured i18n instance + +interface I18nProviderProps { + children: ReactNode; +} + +const I18nProvider: React.FC = ({ children }) => { + return {children}; +}; + +export default I18nProvider; \ No newline at end of file diff --git a/src/lib/i18nConfig.tsx b/src/lib/i18nConfig.tsx new file mode 100644 index 0000000..09e28a7 --- /dev/null +++ b/src/lib/i18nConfig.tsx @@ -0,0 +1,19 @@ +import i18n from 'i18next'; +import { initReactI18next } from 'react-i18next'; +import translationAR from '../translate/ar.json'; + +const resources = { + ar: { + translation: translationAR, + }, +}; + +i18n.use(initReactI18next).init({ + resources, + lng: 'ar', // Set the default language + interpolation: { + escapeValue: false, + }, +}); + +export default i18n; \ No newline at end of file diff --git a/src/translate/en.json b/src/translate/en.json deleted file mode 100644 index b0e912b..0000000 --- a/src/translate/en.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "main_page": "Main Page", - "dashboard": "dashboard", - - "validation": { - "required": "required", - "value_must_be_less_than_900000": "value_must_be_less_than_900000", - "type_required": "type_required", - "pleas_fill_all_label": "pleas Fill All Label", - "please_select_students": "please_select_students", - "please_fill_in_all_the_fields": "please_fill_in_all_the_fields", - "Invalid_email": "Invalid_email", - "Email_is_required": "Email_is_required", - "Password_is_required": "Password_is_required", - "Password_must_be_at_least_8_characters_long": "Password_must_be_at_least_8_characters_long", - "Nationality_is_required": "Nationality_is_required", - "Address_is_required": "Address_is_required", - "Place_of_birth_is_required": "Place_of_birth_is_required", - "Date_of_birth_is_required": "Date_of_birth_is_required", - "Mother's_name_is_required": "Mother's_name_is_required", - "Father's_name_is_required": "Father's_name_is_required", - "Last_name_is_required": "Last_name_is_required", - "First_name_is_required": "First_name_is_required", - "Religion_is_required": "Religion_is_required", - "Gender_is_required": "Gender_is_required", - "Attachment1_is_required": "Attachment1_is_required", - "Father's_job_is_required": "Father's_job_is_required", - "Mother's_phone_number_is_required": "Mother's_phone_number_is_required", - "Father's_phone_number_is_required": "Father's_phone_number_is_required", - "Mother's_job_is_required": "Mother's_job_is_required", - "justification_is_required": "justification_is_required", - "duration_is_required": "duration_is_required", - "pleas_do_any_changes": "pleas_do_any_changes", - "edit_session_content": "edit_session_content", - "Title_is_required": "Title_is_required", - "Exam_type_is_required": "Exam_type_is_required", - "Subject_is_required": "Subject_is_required", - "Maximum_grade_is_required": "Maximum_grade_is_required", - "Must_be_a_number": "Must_be_a_number", - "Value_must_not_exceed_10000": "Value_must_not_exceed_10000", - "Passing_grade_is_required": "Passing_grade_is_required", - "Date_is_required": "Date_is_required", - "Duration_is_required": "Duration_is_required", - "the_possess_done_successful": "the_possess_done_successful", - "some_thing_went_wrong": "some_thing_went_wrong", - "Due_date_must_be_before_assigning_date": "Due date must be before assigning date" - }, - "header": { - "register_students": "register_students", - "import_students": "import_students", - "move_student": "move_student", - "Student_added_successfully": "Student_added_successfully", - "the_student_has_been_added_Do_you_want_to_add_another_student": "the_student_has_been_added_Do_you_want_to_add_another_student", - "Add_a_new_student": "Add_a_new_student", - "Please enter all required data": "Please enter all required data", - "Back to Previous Step": "Back to Previous Step", - "Adding...": "Adding...", - "Next Step": "Next Step", - "Add Student": "Add Student", - "Attendance and absence of students": "Attendance and absence of students", - "see_more_details": "see_more_details", - "earlyDepartures": "earlyDepartures", - "Follow_the_curriculum": "Follow_the_curriculum", - "add_session_content": "add_session_content", - "add_session": "add_session", - "edit_session": "edit_session", - "classroom_behavior_of_students": "classroom_behavior_of_students", - "note_details": "note_details", - "student_homework": "student_homework", - "home_work_title": "home_work_title", - "subject": "subject", - "max_grade": "max_grade", - "student_count": "student_count", - "student_exam": "student_exam", - "student_name": "student_name", - "student_card": "student_card", - "Student_classroom_behavior": "Student_classroom_behavior", - "The_student_financial_situation": "The_student_financial_situation", - "Modify_student_information": "Modify_student_information", - "student_details": "student_details", - "student_status": "student_status", - - "parent_details": "parent_details", - "contact_details": "contact_details", - "additional_details": "additional_details", - "note_type": "note_type", - "student_payment": "student_payment", - "add_new_unit": "add_new_unit", - "add_new_lessons": "add_new_lessons", - "Student_Information": "Student_Information", - "Parent_Information": "Parent_Information", - "Contact_Information": "Contact_Information", - "Attachment_Images": "Attachment_Images", - "Weekly_Class_Schedule": "Weekly_Class_Schedule", - "Print_Schedule": "Print_Schedule", - "Welcome": "Welcome", - "Enter your email and password to log in": "Enter your email and password to log in", - "change_your_current_password": "change your current password", - "view_cycle_for_this_branch": "view cycle for this branch", - "view_term_for_this_cycle": "view term for this branch" - }, - "columns": { - "id": "id", - "name": "name", - "address": "address", - "contact_information": "contact_information", - "data": "data", - "details": "details", - "receipt_number": "receipt_number", - "payment_type": "payment_type", - "value": "value", - "subject_name": "subject_name", - "image": "image", - "card": "card", - "birthday": "birthday", - "last_name": "last_name", - "father_name": "father_name", - "sex": "sex", - "presence": "presence", - "teacher_name": "teacher_name", - "lesson_name": "lesson_name", - "session_start": "session_start", - "type": "type", - "title": "title", - "content": "content", - "assigning_date": "assigning_date", - "due_date": "due_date", - "mark": "mark", - "student_name": "student_name", - "absence": "absence", - "earlyDeparture": "earlyDeparture", - "lateArrival": "lateArrival", - "date": "date", - "starting_date": "starting_date", - "ending_date": "ending_date", - "term_type": "term_type", - "status": "status" - }, - "practical": { - "to_confirm_deletion_please_re_enter": "To confirm deletion, please re-enter", - - "back": "back", - "add": "add", - "edit": "edit", - "move": "move", - "skip": "skip", - "show": "show", - "save": "save", - "enter": "enter", - "delete": "delete", - "cancel": "cancel", - "search_here": "search_here", - "details": "details", - "export_students": "export_students", - "send_notification_to_course": "send_notification_to_course", - "Send_Direct_Notification": "Send_Direct_Notification", - "cancel_registration": "cancel_registration", - "send_notification_to_education_class": "send_notification_to_education_class", - "send_notification_to_student": "send_notification_to_student", - "status": "status", - "Step": "Step", - "login": "login", - "submite": "submite", - "index": "index", - "store": "store", - "update": "update", - "me": "me", - "importStudentData": "importStudentData", - "moveStudents": "moveStudents", - "importStudents": "importStudents", - "overview": "overview", - "presence": "presence" - }, - "Table": { - "header": "", - "info": "" - }, - "models": { - "teacher": "teacher", - "student": "student", - "students": "students", - "subject": "subject", - "education_class": "education_class", - "eduClass": "education_class", - - "session_content": "session_content", - "course": "course", - "payment": "payment", - "note": "note", - "homework": "homework", - "mark": "mark", - "exam": "exam", - "absence": "absence", - "late_arrival": "late_arrival", - "presence": "presence", - "earlyDeparture": "earlyDeparture", - "branch": "branch", - "cycle": "cycle", - "term": "term", - "role": "role", - - "Pass": "Pass", - "user": "User", - "branchAdmin": "Branch Admin", - "grade": "Grade", - "homeworkAttachment": "Homework Attachment", - "lateArrival": "Late Arrival", - "noteAttachment": "Note Attachment", - "session": "Session", - "sessionContent": "Session Content", - - "subjectAttachment": "Subject Attachment", - "unit": "Unit", - "lesson": "Lesson", - "exercise": "Exercise", - "exerciseAnswer": "Exercise Answer", - "tag": "Tag", - - "Exam": "Exam", - "ExamType": "Exam Type", - - "studentParent": "Student Parent", - "registrationRecord": "Registration Record", - "paymentOverview": "Payment Overview", - "subjectAttachmentType": "Subject Attachment Type", - "param": "Param", - "subjectProgress": "Subject Progress", - "main_page": "Main Page" - }, - "education_class_actions": { - "Student_Records": "Student_Records", - "Attendance": "Attendance", - "Permissions": "Permissions", - "Grades": "Grades", - "Notes": "Notes", - "Financial_Status": "Financial_Status", - "Assignments": "Assignments", - "Class_Schedule": "Class_Schedule", - "Curriculum_Follow_up": "Curriculum_Follow_up" - }, - - "input": { - "name": "name", - "address": "address", - "number": "number", - "price": "price", - "drag_and_drop_or_click_here_to_select_the_file": "Drag and drop or click here to select the file", - "Click_to_upload_the_image": "Click to upload the image", - "payment_type": "payment_type", - "details": "details", - "student_name": "student_name", - "receipt_number": "receipt_number", - "date": "date", - "value": "value", - "teacher_name": "teacher_name", - "sex": "sex", - "content": "content", - "type": "type", - "attachments": "attachments", - "send_notification_to_course": "send_notification_to_course", - "export_students": "export_students", - "password": "password", - "nationality": "nationality", - "religion": "religion", - "birthday": "birthday", - "birth_place": "birth_place", - "father_name": "father_name", - "father_job": "father_job", - "mother_name": "mother_name", - "mother_phone_number": "mother_phone_number", - "father_phone_number": "father_phone_number", - "mother_job": "mother_job", - "phone_number": "phone_number", - "additional_phone_number": "additional_phone_number", - "note": "note", - "school_document": "school_document", - "first_name": "first_name", - "last_name": "last_name", - "email": "email", - "student_status": "student_status", - "duration": "duration", - "justification": "justification", - "attachment": "attachment", - "session_name": "session_name", - "lesson_name": "lesson_name", - "title": "title", - "due_date": "due_date", - "assigning_date": "assigning_date", - "subject_name": "subject_name", - "exam_type": "exam_type", - "grade_to_pass": "grade_to_pass", - "max_grade": "max_grade", - "status": "status", - "departure_time": "departure_time", - "mark": "mark", - "image": "image", - "term": "term", - "session_start": "session_start", - "session_end": "session_end", - "academic_year": "academic_year", - "select_date": "select_date", - "School_Year": "School Year", - "Enter_branch_first": "Enter branch first", - "School_Term": "School Term", - "Enter_school_year_first": "Enter school year first", - "Username": "Username", - "Password": "Password", - "new_password": "new_password", - "old_password": "old_password", - "username": "username", - "starting_date": "starting_date", - "ending_date": "ending_date", - "term_type": "term_type", - "description": "description", - "abilities": "abilities" - }, - - "select": { - "Payments": { - "paid": "paid", - "to_be_paid": "to_be_paid", - "all_payment": "all_payment", - "dues": "dues" - }, - "Marks": { - "Not_Taken": "Not_Taken", - "Taken": "Taken" - }, - "Sex": { - "male": "male", - "female": "female", - "bi": "mix" - }, - "Religion": { - "muslim": "muslim", - "christianity": "christianity", - "other": "other" - }, - "nationalities": { - "Afghan": "Afghan", - "Albanian": "Albanian", - "Algerian": "Algerian", - "American": "American", - "Andorran": "Andorran", - "Angolan": "Angolan", - "Antiguans": "Antiguans", - "Argentinean": "Argentinean", - "Armenian": "Armenian", - "Australian": "Australian", - "Austrian": "Austrian", - "Azerbaijani": "Azerbaijani", - "Bahamian": "Bahamian", - "Bahraini": "Bahraini", - "Bangladeshi": "Bangladeshi", - "Barbadian": "Barbadian", - "Barbudans": "Barbudans", - "Batswana": "Batswana", - "Belarusian": "Belarusian", - "Belgian": "Belgian", - "Belizean": "Belizean", - "Beninese": "Beninese", - "Bhutanese": "Bhutanese", - "Bolivian": "Bolivian", - "Bosnian": "Bosnian", - "Brazilian": "Brazilian", - "British": "British", - "Bruneian": "Bruneian", - "Bulgarian": "Bulgarian", - "Burkinabe": "Burkinabe", - "Burmese": "Burmese", - "Burundian": "Burundian", - "Cambodian": "Cambodian", - "Cameroonian": "Cameroonian", - "Canadian": "Canadian", - "Cape Verdean": "Cape Verdean", - "Central African": "Central African", - "Chadian": "Chadian", - "Chilean": "Chilean", - "Chinese": "Chinese", - "Colombian": "Colombian", - "Comoran": "Comoran", - "Congolese": "Congolese", - "Costa Rican": "Costa Rican", - "Croatian": "Croatian", - "Cuban": "Cuban", - "Cypriot": "Cypriot", - "Czech": "Czech", - "Danish": "Danish", - "Djibouti": "Djibouti", - "Dominican": "Dominican", - "Dutch": "Dutch", - "East Timorese": "East Timorese", - "Ecuadorean": "Ecuadorean", - "Egyptian": "Egyptian", - "Emirian": "Emirian", - "Equatorial Guinean": "Equatorial Guinean", - "Eritrean": "Eritrean", - "Estonian": "Estonian", - "Ethiopian": "Ethiopian", - "Fijian": "Fijian", - "Filipino": "Filipino", - "Finnish": "Finnish", - "French": "French", - "Gabonese": "Gabonese", - "Gambian": "Gambian", - "Georgian": "Georgian", - "German": "German", - "Ghanaian": "Ghanaian", - "Greek": "Greek", - "Grenadian": "Grenadian", - "Guatemalan": "Guatemalan", - "Guinea-Bissauan": "Guinea-Bissauan", - "Guinean": "Guinean", - "Guyanese": "Guyanese", - "Haitian": "Haitian", - "Herzegovinian": "Herzegovinian", - "Honduran": "Honduran", - "Hungarian": "Hungarian", - "I-Kiribati": "I-Kiribati", - "Icelander": "Icelander", - "Indian": "Indian", - "Indonesian": "Indonesian", - "Iranian": "Iranian", - "Iraqi": "Iraqi", - "Irish": "Irish", - "palestine": "palestine", - "Italian": "Italian", - "Ivorian": "Ivorian", - "Jamaican": "Jamaican", - "Japanese": "Japanese", - "Jordanian": "Jordanian", - "Kazakhstani": "Kazakhstani", - "Kenyan": "Kenyan", - "Kittian and Nevisian": "Kittian and Nevisian", - "Kuwaiti": "Kuwaiti", - "Kyrgyz": "Kyrgyz", - "Laotian": "Laotian", - "Latvian": "Latvian", - "Lebanese": "Lebanese", - "Liberian": "Liberian", - "Libyan": "Libyan", - "Liechtensteiner": "Liechtensteiner", - "Lithuanian": "Lithuanian", - "Luxembourger": "Luxembourger", - "Macedonian": "Macedonian", - "Malagasy": "Malagasy", - "Malawian": "Malawian", - "Malaysian": "Malaysian", - "Maldivan": "Maldivan", - "Malian": "Malian", - "Maltese": "Maltese", - "Marshallese": "Marshallese", - "Mauritanian": "Mauritanian", - "Mauritian": "Mauritian", - "Mexican": "Mexican", - "Micronesian": "Micronesian", - "Moldovan": "Moldovan", - "Monacan": "Monacan", - "Mongolian": "Mongolian", - "Moroccan": "Moroccan", - "Mosotho": "Mosotho", - "Motswana": "Motswana", - "Mozambican": "Mozambican", - "Namibian": "Namibian", - "Nauruan": "Nauruan", - "Nepali": "Nepali", - "New Zealander": "New Zealander", - "Nicaraguan": "Nicaraguan", - "Nigerian": "Nigerian", - "Nigerien": "Nigerien", - "North Korean": "North Korean", - "Northern Irish": "Northern Irish", - "Norwegian": "Norwegian", - "Omani": "Omani", - "Pakistani": "Pakistani", - "Palauan": "Palauan", - "Panamanian": "Panamanian", - "Papua New Guinean": "Papua New Guinean", - "Paraguayan": "Paraguayan", - "Peruvian": "Peruvian", - "Polish": "Polish", - "Portuguese": "Portuguese", - "Qatari": "Qatari", - "Romanian": "Romanian", - "Russian": "Russian", - "Rwandan": "Rwandan", - "Saint Lucian": "Saint Lucian", - "Salvadoran": "Salvadoran", - "Samoan": "Samoan", - "San Marinese": "San Marinese", - "Sao Tomean": "Sao Tomean", - "Saudi": "Saudi", - "Scottish": "Scottish", - "Senegalese": "Senegalese", - "Serbian": "Serbian", - "Seychellois": "Seychellois", - "Sierra Leonean": "Sierra Leonean", - "Singaporean": "Singaporean", - "Slovakian": "Slovakian", - "Slovenian": "Slovenian", - "Solomon Islander": "Solomon Islander", - "Somali": "Somali", - "South African": "South African", - "South Korean": "South Korean", - "Spanish": "Spanish", - "Sri Lankan": "Sri Lankan", - "Sudanese": "Sudanese", - "Surinamer": "Surinamer", - "Swazi": "Swazi", - "Swedish": "Swedish", - "Swiss": "Swiss", - "Syrian": "Syrian", - "Taiwanese": "Taiwanese", - "Tajik": "Tajik", - "Tanzanian": "Tanzanian", - "Thai": "Thai", - "Togolese": "Togolese", - "Tongan": "Tongan", - "Trinidadian/Tobagonian": "Trinidadian/Tobagonian", - "Tunisian": "Tunisian", - "Turkish": "Turkish", - "Tuvaluan": "Tuvaluan", - "Ugandan": "Ugandan", - "Ukrainian": "Ukrainian", - "Uruguayan": "Uruguayan", - "Uzbekistani": "Uzbekistani", - "Venezuelan": "Venezuelan", - "Vietnamese": "Vietnamese", - "Welsh": "Welsh", - "Yemenite": "Yemenite", - "Zambian": "Zambian", - "Zimbabwean": "Zimbabwean" - }, - "Student_Type": { - "all_students": "all_students", - "absence": "absence", - "late_arrival": "late_arrival", - "presence": "presence", - "justified": "justified", - "not_justified": "not_justified", - "earlyDeparture": "earlyDeparture" - }, - "Note": { - "normal_note": "normal_note", - "alert_note": "alert_note", - "financial_note": "financial_note", - "positive_note": "positive_note", - "warning_note": "warning_note", - "academic_note": "academic_note", - "studying_note": "studying_note", - "organization_note": "organization_note", - "all_note": "all_note" - }, - "Exam": { - "Taken": "Taken", - "Not_Taken": "Not_Taken", - "all_student": "all_student" - }, - "Term_type": { - "first": "first", - "second": "second" - } - }, - "array": { - "Period": { - "Today": "Today", - "First": "First", - "Second": "Second", - "Third": "Third", - "Fourth": "Fourth", - "Fifth": "Fifth", - "Sixth": "Sixth", - "Seventh": "Seventh" - }, - "Days": { - "Sunday": "Sunday", - "Monday": "Monday", - "Tuesday": "Tuesday", - "Wednesday": "Wednesday", - "Thursday": "Thursday", - "Friday": "Friday", - "Saturday": "Saturday" - }, - "UserInfo": { - "course": "course", - "education_class": "education_class", - "nationality": "nationality", - "birthday": "birthday", - "warning": "warning", - "appreciation": "appreciation", - "alert": "alert" - } - }, - "sidebar": { - "dashboard": "dashboard", - "course": "course", - "teacher": "teacher", - "payment": "payment", - "student_details": "student_details", - "create_student": "create_student", - "course_details": "course_details", - "education_class_details": "education_class_details", - "subject_details": "subject_details", - "logout": "logout", - "branch": "branch", - "role": "role" - }, - "message": { - "some_thing_went_wrong": "some_thing_went_wrong", - "the_possess_done_successful": "the_possess_done_successful" - } -} diff --git a/src/types/App.ts b/src/types/App.ts index 29e51a5..5f4857f 100644 --- a/src/types/App.ts +++ b/src/types/App.ts @@ -2,7 +2,7 @@ import { ReactElement, LazyExoticComponent, ReactNode } from "react"; import { Mark_State, Payment_type, term_type } from "./Item"; import { ABILITIES_ENUM, ABILITIES_VALUES_ENUM } from "../enums/abilities"; -export type Tchildren = { +export type ChildrenType = { children: ReactNode; }; diff --git a/src/utils/LocalStorage.ts b/src/utils/LocalStorage.ts index 86089dd..10b115f 100644 --- a/src/utils/LocalStorage.ts +++ b/src/utils/LocalStorage.ts @@ -3,7 +3,7 @@ export const getLocalStorage = (key: string) => { const data = localStorage?.getItem(key); return data ? JSON.parse(data) : null; } catch (error) { - console.error("Error parsing JSON from localStorage", error); + // console.error("Error parsing JSON from localStorage", error); return null; } };