refactor: move frontend in apps/frontend
No files matched your search
@@ -17,7 +17,7 @@ dist-ssr
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
../../.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
|
||||
import { setProjectAnnotations } from '@storybook/react-vite';
|
||||
import * as projectAnnotations from './preview';
|
||||
import * as projectAnnotations from './preview.js';
|
||||
|
||||
// This is an important step to apply the right configuration when testing your stories.
|
||||
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
||||
@@ -8,6 +8,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
<script type="module" src="/apps/frontend/srcs/frontend/src/main.jsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "eslint .",
|
||||
"lint": "eslint ../..",
|
||||
"preview": "vite preview",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"build-storybook": "storybook build",
|
||||
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 578 B |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1009 B After Width: | Height: | Size: 1009 B |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 376 B After Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 559 B |
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,5 +1,5 @@
|
||||
import { createContext } from "react";
|
||||
import User from "./../../interfaces/user.interface"
|
||||
import User from "../../interfaces/user.interface"
|
||||
|
||||
export interface AuthContextType {
|
||||
user: User | null;
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import loginFunction from "../../utils/auth/login.js";
|
||||
import getUser from "../../utils/getUser.js";
|
||||
import { AuthContext } from "./AuthContext";
|
||||
import logoutFunction from "../../utils/auth/logout.js"
|
||||
import loginFunction from "../../utils/auth/login.ts";
|
||||
import getUser from "../../utils/getUser.ts";
|
||||
import { AuthContext } from "./AuthContext.ts";
|
||||
import logoutFunction from "../../utils/auth/logout.ts"
|
||||
|
||||
|
||||
export function AuthProvider({ children }) {
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useState} from 'react';
|
||||
import { EventDetailContext } from "./EventDetailContext.js"
|
||||
import getEventById from "../../utils/events/getEventById";
|
||||
import deleteTaskFunction from "../../utils/tasks/deleteTask";
|
||||
import getEventById from "../../utils/events/getEventById.ts";
|
||||
import deleteTaskFunction from "../../utils/tasks/deleteTask.ts";
|
||||
|
||||
export function EventDetailProvider({ children }) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useState } from "react";
|
||||
import { PendingMembersContext } from "./PendingMembersContext";
|
||||
import { PendingMembersContext } from "./PendingMembersContext.js";
|
||||
|
||||
import getUserToValidate from "../../utils/users/getUserToValidate";
|
||||
import getUserById from "../../utils/users/getUserById";
|
||||
import getUserToValidate from "../../utils/users/getUserToValidate.ts";
|
||||
import getUserById from "../../utils/users/getUserById.ts";
|
||||
|
||||
export function PendingMembersProvider({ children }) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Outlet } from "react-router";
|
||||
import Footer from "./components/Footer/Footer.jsx"
|
||||
import Header from "./components/Header/Header.jsx";
|
||||
import Background from "./components/Background/Background.jsx";
|
||||
import Footer from "./components/Footer/Footer.tsx"
|
||||
import Header from "./components/Header/Header.tsx";
|
||||
import Background from "./components/Background/Background.tsx";
|
||||
import { Navigate } from "react-router";
|
||||
import { useContext} from "react";
|
||||
import { AuthContext } from "./contexts/Auth/AuthContext.js";
|
||||
import { AuthContext } from "./contexts/Auth/AuthContext.ts";
|
||||
import Loading from "./components/ui/Loading/Loading.tsx";
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ import {StrictMode} from 'react'
|
||||
import {createRoot} from 'react-dom/client'
|
||||
import './index.css'
|
||||
import {RouterProvider} from "react-router";
|
||||
import router from './router';
|
||||
import router from './router.js';
|
||||
import {AuthProvider} from "./contexts/Auth/AuthProvider.jsx";
|
||||
import {EventProvider} from "./contexts/Events/EventProvider.jsx";
|
||||
import {EventProvider} from "./contexts/Events/EventProvider.tsx";
|
||||
import {EventDetailProvider} from "./contexts/EventDetail/EventDetailProvider.jsx";
|
||||
import {PendingMembersProvider} from "./contexts/PendingMembers/PendingMembersProvider.jsx";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useContext } from "react";
|
||||
import styles from "./IncompleteEvent.module.css";
|
||||
import { EventContext } from "../../../../contexts/Events/EventContext.js";
|
||||
import { EventContext } from "../../../../contexts/Events/EventContext.ts";
|
||||
|
||||
function IncompleteEvent() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, {useState, useEffect, useContext} from "react";
|
||||
import Button from "../../../../components/ui/Button/Button";
|
||||
import Button from "../../../../components/ui/Button/Button.tsx";
|
||||
import styles from "./PendingMembers.module.css";
|
||||
import Modal from "../../../../components/ui/Modal/Modal";
|
||||
import validateUser from "../../../../utils/users/validateUser.js";
|
||||
import deleteOtherUser from "../../../../utils/users/deleteOtherUser.js";
|
||||
import { PendingMembersContext } from "../../../../contexts/PendingMembers/PendingMembersContext";
|
||||
import Modal from "../../../../components/ui/Modal/Modal.tsx";
|
||||
import validateUser from "../../../../utils/users/validateUser.ts";
|
||||
import deleteOtherUser from "../../../../utils/users/deleteOtherUser.ts";
|
||||
import { PendingMembersContext } from "../../../../contexts/PendingMembers/PendingMembersContext.js";
|
||||
|
||||
function PendingMembers() {
|
||||
const [open, setOpen] = useState(false);
|
||||
@@ -1,9 +1,9 @@
|
||||
import styles from "../../EventDetailPage.module.css";
|
||||
import Button from "../../../../components/ui/Button/Button";
|
||||
import Button from "../../../../components/ui/Button/Button.tsx";
|
||||
import {useContext, useState} from "react";
|
||||
import TextInput from "../../../../components/ui/Input/Input";
|
||||
import Modal from "../../../../components/ui/Modal/Modal";
|
||||
import createTaskApi from "../../../../utils/tasks/createTask.js";
|
||||
import TextInput from "../../../../components/ui/Input/Input.tsx";
|
||||
import Modal from "../../../../components/ui/Modal/Modal.tsx";
|
||||
import createTaskApi from "../../../../utils/tasks/createTask.ts";
|
||||
import {EventDetailContext} from "../../../../contexts/EventDetail/EventDetailContext.js";
|
||||
|
||||
export default function CreateTaskBtn({ id }) {
|
||||