Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions components/Admin/FormsTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function FormsTable() {
title: 'Name',
editable: true,
required: false,
width: 300,
width: 250,
dataIndex: 'name'
},
{
Expand All @@ -50,7 +50,6 @@ function FormsTable() {
{
title: 'URL',
editable: true,
width: 500,
dataIndex: 'url',
render: function Url(url) {
return <a href={url}>{url}</a>;
Expand All @@ -59,7 +58,7 @@ function FormsTable() {
{
title: 'Link',
editable: false,
width: 500,
width: 300,
dataIndex: 'slug',
render: function UrlLink(slug) {
const link = `${process.env.NEXT_PUBLIC_APP_URL}/f/${slug}`;
Expand All @@ -75,11 +74,13 @@ function FormsTable() {
title: 'Visits',
editable: false,
align: 'center',
width: 40,
dataIndex: 'visits'
},
{
title: 'Last edited',
editable: false,
width: 150,
dataIndex: 'updated',
render: function Updated(updated) {
const formatted = DateTime.fromISO(updated)
Expand Down
20 changes: 19 additions & 1 deletion components/Admin/LinksTable/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import { useLinks } from '../Context';
import { Checkbox, Table, Typography, notification } from 'antd';
import { MenuOutlined } from '@ant-design/icons';
import { Table, Checkbox, notification } from 'antd';
import { Twemoji } from 'react-emoji-render';
import { sortableContainer, sortableElement, sortableHandle } from 'react-sortable-hoc';
import Actions from './Actions';
Expand Down Expand Up @@ -35,12 +35,14 @@ const columns = [
{
title: 'Title',
dataIndex: 'title',
width: 250,
className: styles.visible
},
{
title: 'Attention',
dataIndex: 'attention',
align: 'center',
width: 40,
render: function Attention(state) {
return <Checkbox checked={state} disabled={true} />;
}
Expand All @@ -53,10 +55,26 @@ const columns = [
return <a href={url}>{url}</a>;
}
},
{
title: 'Link',
editable: false,
width: 300,
dataIndex: 'slug',
render: function UrlLink(slug) {
const link = `${process.env.NEXT_PUBLIC_APP_URL}/r/${slug}`;

return (
<Typography.Link href={link} copyable>
{link}
</Typography.Link>
);
}
},
{
title: 'Clicks',
dataIndex: 'clicks',
align: 'center',
width: 40,
className: styles.visible
},
{
Expand Down