mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 12:26:19 -05:00
Reformatting Channel page to display buttons better on mobile. Creating BackButton to consolidate functionality. Expanding search input on mobile.
This commit is contained in:
parent
759560dc6f
commit
9f52f41d56
6 changed files with 235 additions and 225 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import React, {Fragment, useContext, useEffect, useState} from 'react';
|
||||
import {Link, Route, Routes, useParams} from "react-router-dom";
|
||||
import {
|
||||
CardLink,
|
||||
|
|
@ -50,7 +50,7 @@ export function VideoWrapper() {
|
|||
setFavorite={setFavorite} autoplay={true}/>
|
||||
}
|
||||
|
||||
function Videos({filter}) {
|
||||
function VideosPage({filter}) {
|
||||
let title = 'Videos';
|
||||
if (filter && filter.indexOf('favorite') >= 0) {
|
||||
title = 'Favorite Videos';
|
||||
|
|
@ -105,7 +105,7 @@ function Videos({filter}) {
|
|||
videoOrders = [{key: 'rank', value: 'rank', text: 'Search Rank'}, ...videoOrders];
|
||||
}
|
||||
|
||||
const menuColumns = <>
|
||||
const menuColumns = <Fragment>
|
||||
<Grid.Column mobile={8} computer={5}>
|
||||
<SearchInput clearable searchStr={searchStr} onSubmit={setSearchStr} actionIcon='search'/>
|
||||
</Grid.Column>
|
||||
|
|
@ -118,7 +118,7 @@ function Videos({filter}) {
|
|||
onChange={(e, {value}) => setOrderBy(value)}
|
||||
/>
|
||||
</Grid.Column>
|
||||
</>;
|
||||
</Fragment>;
|
||||
|
||||
let header;
|
||||
if (channel && channel.name) {
|
||||
|
|
@ -287,13 +287,13 @@ export function VideosRoute(props) {
|
|||
<PageContainer>
|
||||
<TabLinks links={links}/>
|
||||
<Routes>
|
||||
<Route path='/' exact element={<Videos/>}/>
|
||||
<Route path='favorites' exact element={<Videos filter='favorite' header='Favorite Videos'/>}/>
|
||||
<Route path='/' exact element={<VideosPage/>}/>
|
||||
<Route path='favorites' exact element={<VideosPage filter='favorite' header='Favorite Videos'/>}/>
|
||||
<Route path='channel' exact element={<Channels/>}/>
|
||||
<Route path='statistics' exact element={<Statistics/>}/>
|
||||
<Route path='channel/new' exact element={<NewChannel/>}/>
|
||||
<Route path='channel/:channelId/edit' exact element={<EditChannel/>}/>
|
||||
<Route path='channel/:channelId/video' exact element={<Videos/>}/>
|
||||
<Route path='channel/:channelId/video' exact element={<VideosPage/>}/>
|
||||
</Routes>
|
||||
</PageContainer>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue