Skip to content

Commit

Permalink
REFACTORING: Frontend source files should be split in several folders (
Browse files Browse the repository at this point in the history
…closes #139).
  • Loading branch information
benel committed Jan 7, 2024
1 parent f094507 commit a9cce53
Show file tree
Hide file tree
Showing 26 changed files with 23 additions and 23 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './CroppedImage.css';
import '../styles/CroppedImage.css';

import ReactCrop from 'react-image-crop';
import 'react-image-crop/dist/ReactCrop.css';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './EditableText.css';
import '../styles/EditableText.css';

import { useState, useEffect } from 'react';
import FormattedText from './FormattedText';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './FutureDocument.css';
import '../styles/FutureDocument.css';

import { useNavigate } from 'react-router-dom';
import Card from 'react-bootstrap/Card';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Menu.js → frontend/src/components/Menu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './Menu.css';
import '../styles/Menu.css';

import Navbar from 'react-bootstrap/Navbar';
import Container from 'react-bootstrap/Container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './Metadata.css';
import '../styles/Metadata.css';

import { useEffect, useState } from 'react';
import yaml from 'yaml';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Type.js → frontend/src/components/Type.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './Metadata.css';
import './Type.css';
import '../styles/Metadata.css';
import '../styles/Type.css';

import { TagFill } from 'react-bootstrap-icons';
import { useState, useContext } from 'react';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './VideoComment.css';
import '../styles/VideoComment.css';

function VideoComment({ children }) {
const timecodeRegex = /(\d{2}:\d{2}:\d{2}\.\d{3}\s*-->\s*\d{2}:\d{2}:\d{2}\.\d{3})/;
Expand Down Expand Up @@ -31,4 +31,4 @@ function VideoComment({ children }) {
}
}

export default VideoComment;
export default VideoComment;
10 changes: 5 additions & 5 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import Menu from './Menu';
import Page from './Page';
import Bookshelf from './Bookshelf';
import './styles/index.css';
import Menu from './components/Menu';
import Page from './routes/Page';
import Bookshelf from './routes/Bookshelf';
import Hyperglosae from './hyperglosae';
import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { NotificationContainer, NotificationManager } from 'react-notifications';
import 'react-notifications/lib/notifications.css';
import { TypesContext } from './TypesContext.js';
import { TypesContext } from './components/TypesContext.js';

const backend = new Hyperglosae(
x => NotificationManager.warning(x, '', 2000)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './Bookshelf.css';
import '../styles/Bookshelf.css';

import { useState, useEffect } from 'react';
import Container from 'react-bootstrap/Container';
import DocumentsCards from './DocumentsCards';
import DocumentsCards from '../components/DocumentsCards';

function Bookshelf({backend}) {
const [documents, setDocuments] = useState([]);
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/Page.js → frontend/src/routes/Page.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import './Page.css';
import '../styles/Page.css';

import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import { useState, useEffect } from 'react';
import { useParams, useLocation } from 'react-router-dom';
import { BookmarkFill } from 'react-bootstrap-icons';
import Metadata from './Metadata';
import DocumentsCards from './DocumentsCards';
import BrowseTools from './BrowseTools';
import EditableText from './EditableText';
import DocumentSources from './DocumentSources';
import Type, { TypeBadge } from './Type';
import Metadata from '../components/Metadata';
import DocumentsCards from '../components/DocumentsCards';
import BrowseTools from '../components/BrowseTools';
import EditableText from '../components/EditableText';
import DocumentSources from '../components/DocumentSources';
import Type, { TypeBadge } from '../components/Type';

function Page({backend}) {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a9cce53

Please sign in to comment.