Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sfr fixes part 2 #52

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Sfr fixes part 2 #52

wants to merge 11 commits into from

Conversation

alaninnovates
Copy link
Member

No description provided.

@alaninnovates
Copy link
Member Author

uhhh i have no idea what i did but the code still works at least

app/src/components/form/Stepper.js Outdated Show resolved Hide resolved
app/src/screens/scouting-flow/ScoutingFlow.js Show resolved Hide resolved
app/src/components/modals/EditNoteModal.tsx Show resolved Hide resolved
const {colors} = useTheme();
const [content, setContent] = useState<string>(note.content);

const saveNote = async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: not actually saving to DB. Judging by the RLS, I would guess it's because you need a policy allowing authenticated users to update their notes.

Screenshot 2024-04-10 at 10 55 22 PM

onSave({...note, content});
};

const styles = StyleSheet.create({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a huge fan of how much space there is underneath the save button. maybe rewrite using KeyboardAvoidingView?
Screenshot 2024-04-10 at 10 56 50 PM

app/src/screens/search-flow/SearchScreen.tsx Show resolved Hide resolved
console.log('storedFormData: ', storedFormData);
if (storedFormData != null) {
const data = JSON.parse(storedFormData);
setArrayData(data.arrayData);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a toast or some other indicator to the user that the form was loaded from offline storage / cache (use a more user-friendly term for this).

}}
onLongPress={() => {
if (!('id' in item)) {
Alert.alert('You cannot edit an offline note!');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can you not edit an offline note?

app/src/components/modals/EditNoteModal.tsx Outdated Show resolved Hide resolved
app/src/components/modals/EditNoteModal.tsx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants