Skip to content

Commit

Permalink
Merge pull request #9 from MarcusMiguel/hotfix/moon-sigil-bug
Browse files Browse the repository at this point in the history
Fixed sigil bug on moons
  • Loading branch information
toblut-midmug authored Sep 16, 2022
2 parents 858ff40 + 590fa70 commit 05f3610
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions ui/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function App() {
const dispatch = useAppDispatch();

useEffect(() => {
console.log(api.ship)
dispatch(loadState());
document.body.style.overflowX = "hidden";
document.body.style.overflowY = "auto";
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const Card = ({ advertisement, setAdToShow }: CardProps) => {
<SourceContainer>
<PublisherInfo>
{
advertisement.ship && advertisement.ship.length <= 14 &&
sigil({
patp: advertisement?.ship,
renderer: reactRenderer,
Expand Down
5 changes: 4 additions & 1 deletion ui/src/components/Chats/Chats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const Chats = () => {
<CardUpperRow>
<CardReceiver>
<CardSigil> {
chat.receiver && chat.receiver.length <= 14 &&
sigil({
patp: chat.receiver,
renderer: reactRenderer,
Expand Down Expand Up @@ -116,6 +117,7 @@ export const Chats = () => {
<ConversationUpperRow>
<ConversationReceiver>
{
currentChat.receiver && currentChat.receiver.length <= 14 &&
sigil({
patp: currentChat.receiver,
renderer: reactRenderer,
Expand All @@ -137,8 +139,9 @@ export const Chats = () => {
<ReceivedMessage key={index}>
<SigilContainer>
{
msg.ship && msg.ship.length <= 14 &&
sigil({
patp: '~fidwed-sipwyn',
patp: msg.ship,
renderer: reactRenderer,
size: 20,
colors: ['white', 'black'],
Expand Down
5 changes: 3 additions & 2 deletions ui/src/components/Details/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const Details = ({ advertisement, setAd, contentToShow }: DetailsProps) =
</PriceContainer>}
<SourceContainer>
<PublisherInfo>
{
{advertisement.ship && advertisement.ship.length <= 14 &&
sigil({
patp: advertisement.ship,
renderer: reactRenderer,
Expand Down Expand Up @@ -246,7 +246,7 @@ export const Details = ({ advertisement, setAd, contentToShow }: DetailsProps) =
{displayChat && <Conversation id="detailsConversation">
<ConversationUpperRow>
<ConversationReceiver>
{
{advertisement.ship && advertisement.ship.length <= 14 &&
sigil({
patp: advertisement.ship,
renderer: reactRenderer,
Expand All @@ -269,6 +269,7 @@ export const Details = ({ advertisement, setAd, contentToShow }: DetailsProps) =
{/* {!(chat.msgs[index] && chat.msgs[index].ship != '~' + api.ship) && */}
<SigilContainer>
{
msg.ship && msg.ship.length <= 14 &&
sigil({
patp: msg.ship,
renderer: reactRenderer,
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/List/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export const List = ({ listAds, contentToShow }: ListProps) => {
<NotificationIcon />
</NotificationButton> */}
<UserInfo>
{
{api.ship && api.ship.length <= 14 &&
sigil({
patp: api.ship!,
patp: api.ship,
renderer: reactRenderer,
size: 20,
colors: ['white', 'black'],
Expand Down
5 changes: 0 additions & 5 deletions ui/src/components/List/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ export const ListGrid = styled.div`
grid-template-columns: repeat(2, 1fr);
gap: 1em;
margin-bottom: 1.5em;
@media (max-width: 768px){
}
`;

export const UpperRow = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export default ({ mode }) => {
console.log(SHIP_URL);

return defineConfig({
plugins: [urbitPlugin({ base: 'classifieds', target: SHIP_URL, secure: false }), reactRefresh()]
plugins: [urbitPlugin({ base: 'classifieds', target: SHIP_URL, secure: false }), reactRefresh()],
});
};

0 comments on commit 05f3610

Please sign in to comment.