ui(admin): add search and sort to ServersContainer

This commit is contained in:
Matthew Penner 2021-05-18 20:53:42 -06:00
parent ae88a01bea
commit bca2338863
16 changed files with 1097 additions and 1381 deletions

View file

@ -1,6 +1,8 @@
import LocationDeleteButton from '@/components/admin/locations/LocationDeleteButton';
import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router';
import tw from 'twin.macro';
import { useHistory, useRouteMatch } from 'react-router-dom';
import { useRouteMatch } from 'react-router-dom';
import { action, Action, Actions, createContextStore, useStoreActions } from 'easy-peasy';
import { Location } from '@/api/admin/locations/getLocations';
import getLocation from '@/api/admin/locations/getLocation';
@ -15,7 +17,6 @@ import Field from '@/components/elements/Field';
import SpinnerOverlay from '@/components/elements/SpinnerOverlay';
import { Form, Formik, FormikHelpers } from 'formik';
import updateLocation from '@/api/admin/locations/updateLocation';
import LocationDeleteButton from '@/components/admin/locations/LocationDeleteButton';
interface ctx {
location: Location | undefined;
@ -99,12 +100,12 @@ const EditInformationContainer = () => {
</div>
<div css={tw`w-full flex flex-row items-center mt-6`}>
<div css={tw`flex`}>
<LocationDeleteButton
locationId={location.id}
onDeleted={() => history.push('/admin/locations')}
/>
</div>
<div css={tw`flex`}>
<LocationDeleteButton
locationId={location.id}
onDeleted={() => history.push('/admin/locations')}
/>
</div>
<div css={tw`flex ml-auto`}>
<Button type={'submit'} disabled={isSubmitting || !isValid}>