Skip to content

Commit

Permalink
Abstract exported component
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Nov 30, 2024
1 parent efea48e commit d1b2927
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
*/
import React, {useState} from 'react';
import './App.css';
import PlayingVideo from "./components/PlayingVideo";
import PlayList from "./components/PlayingList";
import {videos as data} from "./videos"
import {PlayingVideo, PlayList} from "./components";

function App() {
const videos: { title: string, duration: string, transcript: JSX.Element }[] = data
Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Copyright Jiaqi Liu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export { default as PlayList } from "./PlayList";
export { default as PlayingVideo } from "./PlayingVideo";

0 comments on commit d1b2927

Please sign in to comment.